package shuai.feijianke.concurrent;

/**
 * 带回调接口的线程
 * @Author Wangbx
 * @Date 2018/12/18 16:04
 */
public abstract class CallbackAbleThread extends Thread {

    @Override
    public final void run() {
        try {
            run0();
        } finally {
            callback();
        }
    }

    abstract void run0();

    abstract void callback();
}